<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : TestSongXSL.xsl
    Created on : March 28, 2013, 3:52 PM
    Author     : NoiR
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:s="http://xml.netbeans.org/schema/song"
exclude-result-prefixes="s">
    

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="s:Songs">
        <h2>Result</h2>
        <ul>
            <xsl:for-each select="s:Song">
                <li>
                    <div>
                        <button type="button" onclick="playPreview()">Preview</button>
                    </div>
                    <div>
                        <xsl:value-of select="s:SongTitle"/>
                        <br/>
                        <xsl:for-each select="s:Artists">
                            <xsl:value-of select="s:ArtistName"/>
                        </xsl:for-each>
                    </div>
                    <div>
                        <button type="button" onclick="downloadSong()">download</button>
                        <button type="button" onclick="addPlaylist()">add</button>
                    </div>
                </li>
            </xsl:for-each>
        </ul>

    </xsl:template>

</xsl:stylesheet>
